package com.wanxi.web.service.coupon.impl;

import com.wanxi.coupon.api.feign.CouponFeignClient;
import com.wanxi.coupon.api.query.*;
import com.wanxi.coupon.api.result.CommonResult;
import com.wanxi.coupon.api.vo.*;
import com.wanxi.web.service.coupon.CouponWebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * ClassName: CouponWebServiceImpl
 * Description:
 * date: 2022/1/12 18:09
 *
 * @author lxl
 * @version 1.0
 * @since JDK 1.8
 */
@Service
public class CouponWebServiceImpl implements CouponWebService {

    @Autowired
    private CouponFeignClient feignClient;

    @Override
    public CommonResult adminFindAll(CouponAdminQuery couponAdminQuery) {
        return feignClient.adminFindAll(couponAdminQuery);
    }

    @Override
    public CommonResult adminFindStatistic(CouponAdminStatisticQuery couponAdminStatisticQuery) {
        return feignClient.adminFindStatistic(couponAdminStatisticQuery);
    }

    @Override
    public CommonResult adminFindById(Long id) {
        return feignClient.adminFindById(id);
    }

    @Override
    public CommonResult adminAdd(CouponAdminTDO couponAdminTDO) {
        return feignClient.adminAdd(couponAdminTDO);
    }

    @Override
    public CommonResult adminDelete(Integer id) {
        return feignClient.adminDelete(id);
    }

    @Override
    public CommonResult adminGetCount(CouponAdminQuery couponAdminQuery) {
        return feignClient.adminGetCount(couponAdminQuery);
    }

    @Override
    public CommonResult enterpriseFindAll(CouponEnterpriseQuery coupon) {
        return feignClient.enterpriseFindAll(coupon);
    }

    @Override
    public CommonResult enterpriseFindStatistic(CouponEnterpriseStatisticQuery coupon) {
        return feignClient.enterpriseFindStatistic(coupon);
    }

    @Override
    public CommonResult<List<CouponEnterpriseVo>> enterpriseFindById(Long id) {
        return feignClient.enterpriseFindById(id);
    }

    @Override
    public CommonResult enterpriseAdd(CouponEnterpriseTDO coupon) {
        return feignClient.enterpriseAdd(coupon);
    }

    @Override
    public CommonResult enterpriseDelete(Integer id) {
        return feignClient.adminDelete(id);
    }

    @Override
    public CommonResult enterpriseGetCount(CouponEnterpriseQuery coupon) {
        return feignClient.enterpriseGetCount(coupon);
    }

}
